      <div id="right_top" style=" width:710px; float:right; height:20px;margin-top:5px;">        
             <font color="red" style="float:left;margin:3px 0 0 10px;"><%=flash[:notice] %></font>
            <a href="/user/test/home"  
            style=" float:right; margin:0 15px 0 0;"><img src="/images/back.png" width="88" height="27" /></a>
       </div>
      <div style=" width:710px; float:right; margin-top:10px;" >
          <a href="javascript:;" onclick="copy_all();" style="margin-left:15px;"> 复制所选帐号</a>&nbsp;&nbsp;
          <a href="javascript:;" onclick="del();"> 删除</a>&nbsp;&nbsp;
          <a href="javascript:;" onclick="show_update();"> 变更有效期</a> 
         <span id="update_time" style="display:none;">
         <%= text_field 'temp_user', 'update_time', :onClick=>"SelectDate(this,'yyyy-MM-dd')" , 
         :id=>"time-field",:size=>10,:value=>"输入日期"%>
         <input type="button"  value="更改" onclick="extend_time();"></input> 
         </span>
          <br/>
         <table width="700" border="0" cellpadding="0" cellspacing="0" style="border-left:1px solid #dadada; border-top:1px solid #dadada;">    
           <tr width="700" >
               <td width="20"  background="/images/user/report_list/bg_03.jpg" height="30"  valign="middle" 
               style=" border-right:1px solid #dadada;">
               <input type="checkbox" name="all_seect" class="all_select" 
               onclick="select_all(this);" style="margin-left:17px; display:inline;" />
            </td>  
            <td width="100" style="border-right:1px solid #dadada; " 
            background="/images/user/report_list/bg_03.jpg" height="30" align="center" valign="middle" >登录名</td>
            <td width="80" style="border-right:1px solid #dadada; " 
            background="/images/user/report_list/bg_03.jpg" height="30" align="center" valign="middle" >密码</td>
           <td width="80" style="border-right:1px solid #dadada; " 
           background="/images/user/report_list/bg_03.jpg" height="30" align="center" valign="middle" >文件夹</td>
           <td width="160" style="border-right:1px solid #dadada; " 
           background="/images/user/report_list/bg_03.jpg" height="30" align="center" valign="middle" >量表</td>
            <td width="140" style="border-right:1px solid #dadada; " 
             background="/images/user/report_list/bg_03.jpg" height="30" align="center" valign="middle" >有效期至</td>
            <td width="50" style="border-right:1px solid #dadada; " 
            background="/images/user/report_list/bg_03.jpg" height="30" align="center" valign="middle" >状态</td>
             <td width="50" style="border-right:1px solid #dadada; " 
            background="/images/user/report_list/bg_03.jpg" height="30" align="center" valign="middle" >报告</td>
            <!--td width="100" style="border-right:1px solid #dadada; " 
            background="/images/user/report_list/bg_03.jpg" height="30" align="center" valign="middle" >&nbsp;</td-->
           </tr>
      <% @tempusers.each do |tu| %>
       <tr width="600" >
         <td width="50"  height="30" align="center" valign="middle" 
         style="border-bottom:1px solid #dadada; border-right:1px solid #dadada;">
           <input type="checkbox"class="check_boxes" id="check_boxes"  
           alt="用户名:<%=tu.name%> ,  密码:<%=tu.password%>       ; " 
           value="<%=tu.id%>"
           style="margin:7px 0 0 0;">
           </input> 
          </td>
          <td  height="30" align="center" valign="middle" style="border-right:1px solid #dadada; border-bottom:1px solid #dadada" >
         <% if tu.record_id != nil %>
         <a href="/user/reports/show_report/<%=tu.record_id%>">
         <%=tu.name%>
         </a>
         <% else %>
         <%=tu.name%>
         <% end %>
         </td>
         <td height="30" align="center" valign="middle" style="border-right:1px solid #dadada; border-bottom:1px solid #dadada" >
         <%=tu.password%></td>

         <td  height="30" align="center" valign="middle" style="border-right:1px solid #dadada; border-bottom:1px solid #dadada" >
          <% if tu.folder_id >0 %>
         <%=tu.folder.name%><% else %>无
         <% end %></td>
         <td  height="30" align="center" valign="middle" style="border-right:1px solid #dadada; border-bottom:1px solid #dadada"  onmouseover="$('#pop<%=tu.id%>').show();" onmouseout="$('#pop<%=tu.id%>').hide()">
         <%=tu.survey_ids == nil ? '无' : "共#{tu.survey_ids.split(',').size()}个可用量表"%>
         <div id="pop<%=tu.id%>" style="display:none;">
           <% if tu.survey_ids %>
             <% for sid in tu.survey_ids.split(',') %>
               <%= Survey.find(sid.to_i).name %><br/>
             <% end %>
           <% end %>
         </div>
         </td>
         <td height="30" align="center" valign="middle" style="border-right:1px solid #dadada; border-bottom:1px solid #dadada" >
         <%=tu.last_time.strftime('%Y年%m月%d日')%> &nbsp;&nbsp;
         </td>
          <td height="30" align="center" valign="middle" style="border-right:1px solid #dadada; border-bottom:1px solid #dadada" >
         <% if tu.used == true %> 已测 <% else %> 未测 <% end %>
         </td>
         <td height="30" align="center" valign="middle" style="border-right:1px solid #dadada; border-bottom:1px solid #dadada" >
         <% if tu.record_id != nil %>
         <a href="/user/reports/show_report/<%=tu.record_id%>"> 查看 </a>
         <% else %>   无<% end %>
        </td>
   <% end %>
          </table>
     </div><!--列表结束-->
      <div style="margin-left:150px; ">
        <% if @tempusers.page_count > 1%>
           <%if params[:page]==nil
              cur_page=1 else cur_page=params[:page].to_i
              end %>
            <div class="pagination">
            <% if  cur_page >1%>
            <a href="/user/info_manage/accounts?&page=<%=params[:page_num].to_i-1%>"><span>上一页</span></a>|
            <% else %>
            <span>上一页|</span>
            <% end %>
            <% for i in 1..@tempusers.page_count%>
            <% if i==params[:page].to_i %>
            <span>&nbsp;<%=i%>&nbsp;|</span>
            <% else %>
            <a href="/user/info_manage/accounts?&page=<%=i%>"><span>&nbsp;<%=i%>&nbsp;</span></a>|
            <% end %>
            <% end %>
            <% if @tempusers.page_count > 1 && cur_page < @tempusers.page_count %> 
            <a href="/user/info_manage/accounts?&page=<%=cur_page+1%>"><span>下一页</span></a>
            <% else %>
            <span>下一页</span>
            <% end %>
            </div>
            <% end %>
   </div>

